*****Replication File for Analysis with Statute-Years as the Unit of Analysis
*****Severability Doctrine and the Exercise of Judicial Review
*****Garrett N. Vande Kamp
*****garrettvandekamp@uga.edu
*****Date Created 2/1/2022

*****Versions of software used:
*Stata 15.1
*cmp 8.3.5

***Data import (requires user adjustment on line 12)
cd ""
use "Statute-Year Data.dta"

***Package install and sorting (lines 16 and 17 may be redundant for users who have previously used the packages)
ssc install cmp, replace
ssc install ghk2, replace

sort publiclawnum year duplicate

***Descriptive statistics

tab strikethreealtnewbase if year<2012 & year>1951
tab severable if year<2012 & year==enyear & duplicate==0
tab criminalstatute if year<2012 & year==enyear & duplicate==0
tab freespeech if year<2012 & challenge!=0

***Table 1

cmp (strikethreealtnewbase =  courtattitudestatuteideostd i.severable i.criminalstatute i.freespeech, iia) (challenge = c.courtattitudestatuteideostd i.severable i.criminalstatute c.timechal##c.timechal##c.timechal##i.prevchal) if year<2012 & challenge!=.,  ind(challenge*6 4) vce(cluster publiclawnum) tech(dfp)
test timechal timechal#timechal timechal#timechal#timechal
test timechal#1.prevchal timechal#timechal#1.prevchal timechal#timechal#timechal#1.prevchal
margins, dydx(severable) predict(pr eq(challenge))
margins, dydx(criminalstatute) predict(pr eq(challenge))
margins, dydx(severable) predict(pr eq(_outcome_1_3) condition(0 ., eq(challenge)))

***Table 2

cmp (strikethreealtnewbase =  c.courtattitudestatuteideostd##c.PartyMedSupCSFullmin i.severable i.criminalstatute i.freespeech , iia) (challenge = c.courtattitudestatuteideostd##c.PartyMedSupCSFullmin i.severable i.criminalstatute c.timechal##c.timechal##c.timechal##i.prevchal) if year<2012 & challenge!=.,  ind(challenge*6 4) vce(cluster publiclawnum)
test timechal timechal#timechal timechal#timechal#timechal
test timechal#1.prevchal timechal#timechal#1.prevchal timechal#timechal#timechal#1.prevchal

***Table 1A

mprobit strikethreealtnewbase c.courtattitudestatuteideostd i.severable i.criminalstatute i.freespeech if year<2012 & challenge!=., base(-1) cluster(publiclawnum) 

***Table 2A

mprobit strikethreealtnewbase c.courtattitudestatuteideostd##c.PartyMedSupCSFullmin i.severable i.criminalstatute i.freespeech  if year<2012 & challenge!=., base(-1) cluster(publiclawnum) 

***Table 3A

cmp (strikethreealtnewbase =   c.courtattitudestatuteideostd##c.FloorMedSupCSFullmin i.severable i.criminalstatute i.freespeech, iia) (challenge = c.courtattitudestatuteideostd##c.FloorMedSupCSFullmin i.severable i.criminalstatute c.timechal##c.timechal##c.timechal##i.prevchal) if year<2012 & challenge!=.,  ind(challenge*6 4) vce(cluster publiclawnum) constraints(1 2)
test timechal timechal#timechal timechal#timechal#timechal
test timechal#1.prevchal timechal#timechal#1.prevchal timechal#timechal#timechal#1.prevchal

***Table 4A

cmp (strikethreealtnewbase =  c.courtattitudestatuteideostd##c.FiliMedSupCSFullmin i.severable i.criminalstatute i.freespeech, iia) (challenge = c.courtattitudestatuteideostd##c.FiliMedSupCSFullmin i.severable i.criminalstatute c.timechal##c.timechal##c.timechal##i.prevchal) if year<2012 & challenge!=.,  ind(challenge*6 4) vce(cluster publiclawnum) constraints(1 2)
test timechal timechal#timechal timechal#timechal#timechal
test timechal#1.prevchal timechal#timechal#1.prevchal timechal#timechal#timechal#1.prevchal